﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Runda.CMS.Common.Utility;

namespace Runda.CMS.Portal
{
    public partial class Error : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                int ErrorType = 0;
                if (this.Request.QueryString["Error"] != null)
                {
                    try
                    {
                        ErrorType = Convert.ToInt32(Request.QueryString["Error"]);
                    }
                    catch { }
                }
                string Message = "";

                EnumeratorHelper[] errors = EnumeratorHelper.GetFieldTexts(typeof(Enumerator.ErrorType));
                foreach (EnumeratorHelper err in errors)
                {
                    if (err.EnumValue == ErrorType)
                    {
                        Message = err.EnumDisplayText; break;
                    }
                }

                lblError.Text = Message;
            }
        }
    }
}
